bitkeeper revision 1.1625 (429d84a4tcD4ZWpKQyD4i0nn6K6LIg)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 1 Jun 2005 09:49:24 +0000 (09:49 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 1 Jun 2005 09:49:24 +0000 (09:49 +0000)
Add an explicit result field to multicall_entry_t, rather than abusing
the sixth argument field.
Signed-off-by: Keir Fraser <keir@xensource.com>
12 files changed:
freebsd-5.3-xen-sparse/i386-xen/xen/netfront/xn_netfront.c
linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c
linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c
linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c
linux-2.6.11-xen-sparse/drivers/xen/usbback/usbback.c
netbsd-2.0-xen-sparse/sys/arch/xen/xen/if_xennet.c
xen/arch/x86/x86_32/asm-offsets.c
xen/arch/x86/x86_64/asm-offsets.c
xen/include/public/arch-ia64.h
xen/include/public/arch-x86_32.h
xen/include/public/arch-x86_64.h
xen/include/public/xen.h

index 33f1b336c5c17c072f8cf824f6037796f9579e5a..a4ee3fbba0102f21a092513ba1969bac54256576 100644 (file)
@@ -454,7 +454,7 @@ xn_alloc_rx_buffers(struct xn_softc *sc)
     (void)HYPERVISOR_multicall(xn_rx_mcl, i+1);
 
     /* Check return status of HYPERVISOR_dom_mem_op(). */
-    if (unlikely(xn_rx_mcl[i].args[5] != i))
+    if (unlikely(xn_rx_mcl[i].result != i))
         panic("Unable to reduce memory reservation\n");
 
     /* Above is a suitable barrier to ensure backend will see requests. */
index 09ff8c245bae6e335370b10e0d6b2dd23a4fd3c3..3b5b7ff2d84bfd3d23b05184c1bd4bcfbd574898 100644 (file)
@@ -562,7 +562,7 @@ static void dispatch_rw_block_io(blkif_t *blkif, blkif_request_t *req)
 
     for ( i = 0; i < nseg; i++ )
     {
-        if ( unlikely(mcl[i].args[5] != 0) )
+        if ( unlikely(mcl[i].result != 0) )
         {
             DPRINTK("invalid buffer -- could not remap it\n");
             fast_flush_area(pending_idx, nseg);
index 2631bd1399331848bfb01b278798e83b2f14bccf..6b69decbc0dacaa2423715715ab751dfda646209 100644 (file)
@@ -296,12 +296,12 @@ static void net_rx_action(unsigned long unused)
         netif->stats.tx_packets++;
 
         /* The update_va_mapping() must not fail. */
-        if ( unlikely(mcl[0].args[5] != 0) )
+        if ( unlikely(mcl[0].result != 0) )
             BUG();
 
         /* Check the reassignment error code. */
         status = NETIF_RSP_OKAY;
-        if ( unlikely(mcl[1].args[5] != 0) )
+        if ( unlikely(mcl[1].result != 0) )
         {
             DPRINTK("Failed MMU update transferring to DOM%u\n", netif->domid);
             free_mfn(mdata >> PAGE_SHIFT);
@@ -440,7 +440,7 @@ static void net_tx_action(unsigned long unused)
     while ( dealloc_cons != dp )
     {
         /* The update_va_mapping() must not fail. */
-        if ( unlikely(mcl[0].args[5] != 0) )
+        if ( unlikely(mcl[0].result != 0) )
             BUG();
 
         pending_idx = dealloc_ring[MASK_PEND_IDX(dealloc_cons++)];
@@ -606,7 +606,7 @@ static void net_tx_action(unsigned long unused)
         memcpy(&txreq, &pending_tx_info[pending_idx].req, sizeof(txreq));
 
         /* Check the remap error code. */
-        if ( unlikely(mcl[0].args[5] != 0) )
+        if ( unlikely(mcl[0].result != 0) )
         {
             DPRINTK("Bad page frame\n");
             make_tx_response(netif, txreq.id, NETIF_RSP_ERROR);
index b7dbbd151f4c9325a894f1492b6e3020334f7ce4..c1cf2535102908c6fc72612e9021591f93eb6c0f 100644 (file)
@@ -419,7 +419,7 @@ static void network_alloc_rx_buffers(struct net_device *dev)
     (void)HYPERVISOR_multicall(rx_mcl, i+1);
 
     /* Check return status of HYPERVISOR_dom_mem_op(). */
-    if (unlikely(rx_mcl[i].args[5] != i))
+    if (unlikely(rx_mcl[i].result != i))
         panic("Unable to reduce memory reservation\n");
 
     /* Above is a suitable barrier to ensure backend will see requests. */
index 42439405cd800a89611e687a6dce23d324725ba8..0a4cf8b4eab630256e1e3b920f459e6269888a2f 100644 (file)
@@ -686,7 +686,7 @@ static void dispatch_usb_io(usbif_priv_t *up, usbif_request_t *req)
         int j;
         for ( j = 0; j < i; j++ )
         {
-            if ( unlikely(mcl[j].args[5] != 0) )
+            if ( unlikely(mcl[j].result != 0) )
             {
                 printk(KERN_WARNING
                       "invalid buffer %d -- could not remap it\n", j);
index 2ffe6da2a0c4d16fd084311cf8db0f74a1e6a431..3c229b644a462dec16db58ae4048e100ce47e24c 100644 (file)
@@ -612,7 +612,7 @@ xennet_rx_push_buffer(struct xennet_softc *sc, int id)
        (void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
 
        /* Check return status of HYPERVISOR_dom_mem_op(). */
-       if ( rx_mcl[nr_pfns].args[5] != nr_pfns )
+       if ( rx_mcl[nr_pfns].result != nr_pfns )
                panic("Unable to reduce memory reservation\n");
 
        /* Above is a suitable barrier to ensure backend will see requests. */
@@ -912,7 +912,7 @@ network_alloc_rx_buffers(struct xennet_softc *sc)
        (void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
 
        /* Check return status of HYPERVISOR_dom_mem_op(). */
-       if (rx_mcl[nr_pfns].args[5] != nr_pfns)
+       if (rx_mcl[nr_pfns].result != nr_pfns)
                panic("Unable to reduce memory reservation\n");
 
        /* Above is a suitable barrier to ensure backend will see requests. */
index 40c58ab7efbe70e8265961b23ae1cb77acaa81c5..b12d19bd80f52badfccdd2dc2a8f5a97c8066289 100644 (file)
@@ -88,7 +88,9 @@ void __dummy__(void)
     OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
     OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
     OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
-    OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
+    OFFSET(MULTICALL_arg5, multicall_entry_t, args[5]);
+    OFFSET(MULTICALL_arg6, multicall_entry_t, args[6]);
+    OFFSET(MULTICALL_result, multicall_entry_t, result);
     BLANK();
 
     DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
index 9d1f784a7b12bbb7cd3b7414362ecde392a15541..fdb1359c767b4450fdb3a6fed8f4ec3b165341be 100644 (file)
@@ -88,7 +88,9 @@ void __dummy__(void)
     OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
     OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
     OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
-    OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
+    OFFSET(MULTICALL_arg5, multicall_entry_t, args[5]);
+    OFFSET(MULTICALL_arg6, multicall_entry_t, args[6]);
+    OFFSET(MULTICALL_result, multicall_entry_t, result);
     BLANK();
 
     DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
index ebae4b89c3044af747451d8133b80f080a78a679..d2cc7c07ea2767caedfd395cfcfeef6af952c1ad 100644 (file)
@@ -18,7 +18,6 @@
 
 /* NB. Both the following are 64 bits each. */
 typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
-typedef unsigned long cpureg_t;   /* Full-sized register.                    */
 
 typedef struct
 {
index 84ba88e7f7f659f8f855a438b7a21001624d7dc6..21f97669d5bbdda7459ac12c0c4dc45876d61ebb 100644 (file)
@@ -77,7 +77,6 @@
 
 /* NB. Both the following are 32 bits each. */
 typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
-typedef unsigned long cpureg_t;   /* Full-sized register.                    */
 
 /*
  * Send an array of these to HYPERVISOR_set_trap_table()
index c1a66992859d76f4fd52b0e3d17e812d459b5092..65efc977a5ff2714df331d47eb781d66b23cfb4b 100644 (file)
@@ -111,7 +111,6 @@ struct switch_to_user {
 
 /* NB. Both the following are 64 bits each. */
 typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
-typedef unsigned long cpureg_t;   /* Full-sized register.                    */
 
 /*
  * Send an array of these to HYPERVISOR_set_trap_table().
index 31f264aaeba7ea8829f3a9d61880618f95595782..7a97d88ed88cb022bd1f6b082db26b5c8f7abf86 100644 (file)
 #define __HYPERVISOR_set_segment_base     25 /* x86/64 only */
 #define __HYPERVISOR_mmuext_op            26
 
-/*
- * MULTICALLS
- * 
- * Multicalls are listed in an array, with each element being a fixed size 
- * (BYTES_PER_MULTICALL_ENTRY). Each is of the form (op, arg1, ..., argN)
- * where each element of the tuple is a machine word. 
- */
-#define ARGS_PER_MULTICALL_ENTRY 8
-
-
 /* 
  * VIRTUAL INTERRUPTS
  * 
@@ -281,7 +271,7 @@ typedef struct
 {
     memory_t ptr;       /* Machine address of PTE. */
     memory_t val;       /* New contents of PTE.    */
-} PACKED mmu_update_t;
+} mmu_update_t;
 
 /*
  * Send an array of these to HYPERVISOR_multicall().
@@ -289,9 +279,9 @@ typedef struct
  */
 typedef struct
 {
-    cpureg_t op;
-    cpureg_t args[7];
-} PACKED multicall_entry_t;
+    unsigned long op, result;
+    unsigned long args[6];
+} multicall_entry_t;
 
 /* Event channel endpoints per domain. */
 #define NR_EVENT_CHANNELS 1024